package com.weixiaodong.ModelDesign.交给子类.FactoryMethod模式.工厂模式实例;

@SuppressWarnings("all")
public class IDCard extends Product{

    private String owner; // 身份证的拥有者名字

    public IDCard(String owner) {
        this.owner = owner;
        System.out.println("制作" + this.owner + "的ID卡");
    }

    @Override
    public void use() {
        System.out.println("使用" + this.owner + "的ID卡");
    }

    public String getOwner() {
        return this.owner;
    }
}
